num1 = 100 #全局变量
def fn ():
   print(num1) #在函数内访问


fn()

print(num1)  #在函数外访问


